API Documentation
ImageData.h
1 // ImageData.h
3 //
5 
6 namespace nkGraphics
7 {
14  class DLL_GRAPHICS_EXPORT ImageData
15  {
16  public :
17 
18  unsigned char* _data = nullptr ;
19 
20  unsigned int _width = 0 ;
21  unsigned int _height = 0 ;
22  unsigned int _rowByteSize = 0 ;
23 
24  FORMAT _imageFormat = R8G8B8A8_UNORM ;
25 
26  public :
27 
31  ImageData () ;
35  ImageData (ImageData&& other) ;
40 
41  // Getters
49  nkMaths::Vector getPixelAt (unsigned int xPix, unsigned int yPix) ;
50 
51  // Setters
59  void setPixelAt (unsigned int xPix, unsigned int yPix, const nkMaths::Vector& color) ;
60 
61  // Export
67  bool exportToFileAsBmp (const char* path) ;
68 
69  // OpĂ©rateurs
75  ImageData& operator= (ImageData&& other) ;
76  } ;
77 }
nkGraphics::ImageData::~ImageData
~ImageData()
nkGraphics::ImageData::ImageData
ImageData()
nkGraphics::ImageData::ImageData
ImageData(ImageData &&other)
nkGraphics::ImageData::getPixelAt
nkMaths::Vector getPixelAt(unsigned int xPix, unsigned int yPix)
nkGraphics::ImageData
Holds an image data and its description in memory.
Definition: ImageData.h:15
nkGraphics::ImageData::exportToFileAsBmp
bool exportToFileAsBmp(const char *path)
nkGraphics::ImageData::setPixelAt
void setPixelAt(unsigned int xPix, unsigned int yPix, const nkMaths::Vector &color)
nkGraphics::FORMAT
FORMAT
Available formats for resources.
Definition: DxDefinesWrapper.h:155
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkMaths::Vector
A 4-component vector class, with floats.
Definition: Vector.h:12